package org.lemon.ddd.converter;

import org.lemon.ddd.application.dto.UserRoleDTO;
import org.lemon.ddd.model.req.AuthorizeCreateReq;
import org.lemon.ddd.model.req.AuthorizeUpdateReq;
import org.lemon.ddd.model.vo.UserAuthorizeVO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;

/**
 * UserVO转换器
 */
@Mapper(componentModel = "spring")
public interface AuthorizeConverter {

    @Mapping(target = "unitName", ignore = true)
    UserRoleDTO toDTO(AuthorizeCreateReq authorizeCreateReq);

    @Mapping(target = "unitName", ignore = true)
    UserRoleDTO toDTO(AuthorizeUpdateReq authorizeUpdateReq);

    UserAuthorizeVO toVO(UserRoleDTO userRoleDTO);
}
